#!/bin/sh
#
# 简单写一下脚本的功能。
#
#
#

if [ $# -ne 0 ]; then
	echo "Usage: $0 "
	exit
fi

goodsfile=/Users/hbaolong/workshop/gitee/goods/data/goods.md

today=`date |sed -e "s/日.*/日/g" |sed -e "s/ //g"`

echo $today "团购清单：\n "

grep $today $goodsfile  | awk '{ print "产品：" $2 "\n链接：" $3 "\n推荐缘由：" $4 "\n爻值：" $5 "\n"}'

echo "今日产品组成的卦象：\n"
gua=`grep $today $goodsfile |awk '{printf $NF}' `

checkgua  $gua |grep "卦名"

echo ""

echo "今日书摘："
cfortune